﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using iuPlace.Core.Models;
using iuPlace.Core.Services;

namespace iuPlace.Core
{
    public class Session
    {
        public Session()
        {
            this.Container = new Container();
        }        
        
        public string Identification { get; set; }
        public bool IsAuthenticated { get; set; }
        public User User { get; set; }
        public Container Container { get; set; }

        public S ExecuteService<S>()
            where S : Service
        {
            return (S)Activator.CreateInstance(typeof(S), this);
        }
    }
}
